<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateShopFreightOtherAreaTable extends Migration
{
    //运费规则
    public function up()
    {
        Schema::create('shop_freight_other_area', function (Blueprint $table) {
            $table->Increments('id');
            $table->string('template_id')->comment('模板ID');
            $table->decimal('first_price',10,2)->default(0)->comment('首价    默认0');
            $table->smallInteger('first_count')->default(1)->comment('首包含 kg /首包含   默认1');

            $table->decimal('add_price',10,2)->default(0)->comment('新增价 默认0');
            $table->integer('add_count')->default(1)->comment('新增计数   件/公斤 默认0');

            $table->text('area')->comment('配送区域');
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('shop_freight_other_area');
    }
}
